<template>
	<u-popup v-model="lookmine" mode="center" @close='close'>
		<view class="diy-look-mine" v-if="content">
			<view class="title">{{content.space_name || content.name}}</view>
			<view class="num">
				<text>正在挖矿</text>
				<text>{{content.num || content.people_num}}人</text>
			</view>
			<view class="tips">挖矿量</view>
			<view class="content">
				<view class="txt">已挖矿</view>
				<view class="c-num">{{content.total_output || content.total_num}}</view>
			</view>
			<view class="btn" @click="lookmine = false">确定</view>
		</view>
	</u-popup>
</template>

<script>
	export default {
		props: {
			lookmineShow: {
				type: [String, Boolean],
				default: false
			},
			
		},
		data(){
			return {
				//控制弹窗
				lookmine:true,
				//需要渲染的数据
				content:null
			}
		},
		mounted() {},
		watch: {
			lookmineShow: {
				handler(newval, oldVal) {
					this.lookmine = this.lookmineShow;
				},
				immediate: true
			}
		},
		methods:{
			//弹窗关闭
			close(){
				this.$emit('close')
			},
			setinfo(item){
				this.content = item;
				this.lookmine = true;
			}
			
		}
	}
</script>

<style lang="scss" scoped>
	.diy-look-mine{
		width: 70vw;
		height: 40vh;
		border-radius: 20rpx;
		background: #fff;
		padding: 30rpx;
		.title{
			font-size:36rpx;
			font-weight: bold;
			text-align: center;
			margin-bottom: 40rpx;
		}
		.num{
			display: flex;
			align-items: center;
			justify-content: space-between;
			font-size: 26rpx;
			margin-bottom: 20rpx;
			color: #232323;
		}
		.tips{
			font-size: 28rpx;
			font-weight: bold;
			margin-bottom: 20rpx;
		}
		.content{
			width: 100%;
			height: 160rpx;
			border-radius: 20rpx;
			background: #f8f8ff;
			padding: 30rpx;
			.txt{
				font-size: 28rpx;
				margin-bottom: 20rpx;
				text-align: center;
			}
			.c-num{
				font-size: 28rpx;
				font-weight: bold;
				text-align: center;
			}
		}
		.btn{
			margin-top: 30rpx;
			width: 100%;
			height: 60rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 30rpx;
			color: #fff;
			background: rgba(32, 32, 44, 0.8);
			border-radius: 6rpx;
		}
	}
</style>